<template>
  <div>
    <h1>Parent</h1>
    <div>
      <h1>原始父子组件双向绑定 -- {{count}}</h1>
      <Child :count='count' @update:count='count=$event'/>
    </div>

    <div>
      <h1>使用 .sync修饰符 进行父子组件双向绑定 -- {{count}}</h1>
      <Child :count.sync='count'/>
    </div>
  </div>
</template>

<script>
import Child from "./Child";
export default {
  name: "Parent",
  components: {
    Child,
  },
  data(){
    return {
      count:0
    }
  }
};
</script>

<style>
</style>